'use strict';
var Schema = require('mongoose').Schema,
    Model = require('../../../Base/server/controllers/Model');

var modelField = {};
//
modelField.QCNorm = {
    type: Schema.ObjectId,
    ref: 'QCNorm',
    Name: '质检指标',
    IsEmpty: false
};

modelField.BadType = {
    type: Number,
    Name: '不良类型',
    IsEmpty: false
};

var newModel = new Model(modelField);
newModel.addIndex({QCNorm: 1, BadType: 0}, {"unique": true});
newModel.create('BadTypeBind', '不良类型绑定');
